﻿using System;
using System.Collections.Generic;
using System.Text;

namespace EnCor.Security
{
    public class AuthorizationProviderCollection : IEnumerable<IAuthorizationProvider>
    {
        private List<IAuthorizationProvider> _List = new List<IAuthorizationProvider>();

        public AuthorizationProviderCollection(IList<IAuthorizationProvider> list)
        {
            foreach (IAuthorizationProvider provider in list)
            {
                _List.Add(provider);
            }
        }

        #region IEnumerable<IAuthorizationProvider> Members

        public IEnumerator<IAuthorizationProvider> GetEnumerator()
        {
            return _List.GetEnumerator();
        }

        #endregion

        #region IEnumerable Members

        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
        {
            return _List.GetEnumerator();
        }

        #endregion
    }
}
